Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the resource auto-inference to set context.destination.service.resource for JDBC spans (#1913) #1914

Closed
wants to merge 2 commits into from

Conversation

tobiasstadler
Copy link
Contributor

@tobiasstadler tobiasstadler commented Jul 12, 2021

What does this PR do?

Fixes #1913

Checklist

  • This is a bugfix

@apmmachine
Copy link
Contributor

apmmachine commented Jul 12, 2021

❕ Build Aborted

The PR is not allowed to run in the CI yet

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Reason: The PR is not allowed to run in the CI yet

  • Start Time: 2021-07-13T12:39:18.915+0000

  • Duration: 3 min 1 sec

  • Commit: 186e5f6

Trends 🧪

Image of Build Times

Steps errors 2

Expand to view the steps failures

Load a resource file from a shared library
  • Took 0 min 0 sec . View more details on here
  • Description: approval-list/elastic/apm-agent-java.yml
Error signal
  • Took 0 min 0 sec . View more details on here
  • Description: githubPrCheckApproved: The PR is not allowed to run in the CI yet. (Only users with write permissions can do so.)

Log output

Expand to view the last 100 lines of log output

[2021-07-13T12:41:53.506Z] Using reference repository: /var/lib/jenkins/.git-references/apm-agent-java.git
[2021-07-13T12:41:53.511Z] Fetching upstream changes from https://github.com/elastic/apm-agent-java.git
[2021-07-13T12:41:53.511Z]  > git --version # timeout=10
[2021-07-13T12:41:53.517Z]  > git --version # 'git version 2.17.1'
[2021-07-13T12:41:53.518Z] using GIT_ASKPASS to set credentials GitHub user @apmmachine User + Personal Access Token
[2021-07-13T12:41:53.520Z]  > git fetch --no-tags --progress -- https://github.com/elastic/apm-agent-java.git +refs/heads/*:refs/remotes/origin/* # timeout=100
[2021-07-13T12:41:54.269Z]  > git config remote.origin.url https://github.com/elastic/apm-agent-java.git # timeout=10
[2021-07-13T12:41:54.275Z]  > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
[2021-07-13T12:41:54.282Z]  > git config remote.origin.url https://github.com/elastic/apm-agent-java.git # timeout=10
[2021-07-13T12:41:54.292Z] Fetching upstream changes from https://github.com/elastic/apm-agent-java.git
[2021-07-13T12:41:54.293Z] using GIT_ASKPASS to set credentials GitHub user @apmmachine User + Personal Access Token
[2021-07-13T12:41:54.294Z]  > git fetch --no-tags --progress --prune -- https://github.com/elastic/apm-agent-java.git +refs/pull/1914/head:refs/remotes/origin/PR-1914 +refs/heads/master:refs/remotes/origin/master # timeout=100
[2021-07-13T12:41:54.768Z] Merging remotes/origin/master commit 550ce30aa071e7fc9c88c0112d11462cd26916ab into PR head commit 186e5f635a70091f686582bd62abc28f7685763b
[2021-07-13T12:41:55.331Z] Merge succeeded, producing 40d3916be43b691f43b11621d16b00ea39d68fb9
[2021-07-13T12:41:55.332Z] Checking out Revision 40d3916be43b691f43b11621d16b00ea39d68fb9 (PR-1914)
[2021-07-13T12:41:54.775Z]  > git config core.sparsecheckout # timeout=10
[2021-07-13T12:41:54.782Z]  > git checkout -f 186e5f635a70091f686582bd62abc28f7685763b # timeout=100
[2021-07-13T12:41:54.989Z]  > git remote # timeout=10
[2021-07-13T12:41:54.993Z]  > git config --get remote.origin.url # timeout=10
[2021-07-13T12:41:54.997Z] using GIT_ASKPASS to set credentials GitHub user @apmmachine User + Personal Access Token
[2021-07-13T12:41:54.998Z]  > git merge 550ce30aa071e7fc9c88c0112d11462cd26916ab # timeout=10
[2021-07-13T12:41:55.326Z]  > git rev-parse HEAD^{commit} # timeout=10
[2021-07-13T12:41:55.334Z]  > git config core.sparsecheckout # timeout=10
[2021-07-13T12:41:55.349Z]  > git checkout -f 40d3916be43b691f43b11621d16b00ea39d68fb9 # timeout=100
[2021-07-13T12:41:58.942Z] Commit message: "Merge commit '550ce30aa071e7fc9c88c0112d11462cd26916ab' into HEAD"
[2021-07-13T12:41:58.945Z]  > git rev-list --no-walk 186e5f635a70091f686582bd62abc28f7685763b # timeout=10
[2021-07-13T12:41:59.569Z] Masking supported pattern matches of $JOB_GCS_BUCKET or $NOTIFY_TO
[2021-07-13T12:41:59.617Z] Timeout set to expire in 1 hr 0 min
[2021-07-13T12:41:59.632Z] The timestamps step is unnecessary when timestamps are enabled for all Pipeline builds.
[2021-07-13T12:41:59.879Z] [INFO] Number of builds to be searched 10
[2021-07-13T12:42:00.202Z] [INFO] 'shallow' is forced to be disabled when running on PullRequests
[2021-07-13T12:42:00.218Z] Running in /var/lib/jenkins/workspace/_java_apm-agent-java-mbp_PR-1914/src/github.com/elastic/apm-agent-java
[2021-07-13T12:42:00.238Z] [INFO] gitCheckout: Checkout SCM PR-1914 with some customisation.
[2021-07-13T12:42:00.271Z] [INFO] Override default checkout
[2021-07-13T12:42:00.317Z] Sleeping for 10 sec
[2021-07-13T12:42:10.327Z] The recommended git tool is: git
[2021-07-13T12:42:10.440Z] using credential 2a9602aa-ab9f-4e52-baf3-b71ca88469c7-UserAndToken
[2021-07-13T12:42:10.453Z] Cloning the remote Git repository
[2021-07-13T12:42:10.466Z] Cloning repository https://github.com/elastic/apm-agent-java.git
[2021-07-13T12:42:10.489Z]  > git init /var/lib/jenkins/workspace/_java_apm-agent-java-mbp_PR-1914/src/github.com/elastic/apm-agent-java # timeout=10
[2021-07-13T12:42:10.500Z] Using reference repository: /var/lib/jenkins/.git-references/apm-agent-java.git
[2021-07-13T12:42:10.500Z] Fetching upstream changes from https://github.com/elastic/apm-agent-java.git
[2021-07-13T12:42:10.500Z]  > git --version # timeout=10
[2021-07-13T12:42:10.503Z]  > git --version # 'git version 2.17.1'
[2021-07-13T12:42:10.504Z] using GIT_ASKPASS to set credentials GitHub user @apmmachine User + Personal Access Token
[2021-07-13T12:42:10.505Z]  > git fetch --tags --progress -- https://github.com/elastic/apm-agent-java.git +refs/heads/*:refs/remotes/origin/* # timeout=10
[2021-07-13T12:42:11.096Z]  > git config remote.origin.url https://github.com/elastic/apm-agent-java.git # timeout=10
[2021-07-13T12:42:11.099Z]  > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
[2021-07-13T12:42:11.105Z]  > git config remote.origin.url https://github.com/elastic/apm-agent-java.git # timeout=10
[2021-07-13T12:42:11.111Z] Fetching upstream changes from https://github.com/elastic/apm-agent-java.git
[2021-07-13T12:42:11.112Z] using GIT_ASKPASS to set credentials GitHub user @apmmachine User + Personal Access Token
[2021-07-13T12:42:11.112Z]  > git fetch --tags --progress -- https://github.com/elastic/apm-agent-java.git +refs/pull/1914/head:refs/remotes/origin/PR-1914 +refs/heads/master:refs/remotes/origin/master # timeout=10
[2021-07-13T12:42:11.591Z] Checking out Revision 186e5f635a70091f686582bd62abc28f7685763b (origin/PR-1914)
[2021-07-13T12:42:11.785Z] Commit message: "Added #1914 to the changelog"
[2021-07-13T12:42:11.586Z]  > git rev-parse origin/PR-1914^{commit} # timeout=10
[2021-07-13T12:42:11.593Z]  > git config core.sparsecheckout # timeout=10
[2021-07-13T12:42:11.597Z]  > git checkout -f 186e5f635a70091f686582bd62abc28f7685763b # timeout=10
[2021-07-13T12:42:11.788Z]  > git rev-list --no-walk 186e5f635a70091f686582bd62abc28f7685763b # timeout=10
[2021-07-13T12:42:12.641Z] Masking supported pattern matches of $GIT_USERNAME or $GIT_PASSWORD
[2021-07-13T12:42:13.083Z] + git fetch https://****:****@github.com/elastic/apm-agent-java.git +refs/pull/*/head:refs/remotes/origin/pr/*
[2021-07-13T12:42:14.071Z] Running in /var/lib/jenkins/workspace/_java_apm-agent-java-mbp_PR-1914/src/github.com/elastic/apm-agent-java/.git
[2021-07-13T12:42:14.133Z] Archiving artifacts
[2021-07-13T12:42:14.778Z] + git rev-parse HEAD
[2021-07-13T12:42:15.105Z] + git rev-parse HEAD
[2021-07-13T12:42:15.404Z] + git rev-parse origin/pr/1914
[2021-07-13T12:42:15.449Z] [INFO] githubEnv: Found Git Build Cause: pr
[2021-07-13T12:42:15.707Z] Masking supported pattern matches of $GITHUB_TOKEN
[2021-07-13T12:42:16.532Z] [WARN] githubApiCall: The REST API call https://api.github.com/repos/elastic/apm-agent-java/pulls/1914/reviews return 0 elements
[2021-07-13T12:42:16.570Z] [INFO] githubPrCheckApproved: Title: Use the resource auto-inference to set context.destination.service.resource for JDBC spans (#1913) - User: tobiasstadler - Author Association: CONTRIBUTOR
[2021-07-13T12:42:16.822Z] ERROR: githubPrCheckApproved: The PR is not allowed to run in the CI yet
[2021-07-13T12:42:16.822Z] ERROR: githubPrCheckApproved: The PR is not allowed to run in the CI yet. (Only users with write permissions can do so.)
[2021-07-13T12:42:16.857Z] [INFO] Let's stop build #5. The PR is not allowed to run in the CI yet
[2021-07-13T12:42:16.874Z] Sleeping for 5 sec
[2021-07-13T12:42:18.037Z] Stage "Build" skipped due to earlier failure(s)
[2021-07-13T12:42:18.115Z] Stage "Tests" skipped due to earlier failure(s)
[2021-07-13T12:42:18.185Z] Stage "Unit Tests" skipped due to earlier failure(s)
[2021-07-13T12:42:18.186Z] Stage "Smoke Tests 01" skipped due to earlier failure(s)
[2021-07-13T12:42:18.187Z] Stage "Smoke Tests 02" skipped due to earlier failure(s)
[2021-07-13T12:42:18.188Z] Stage "Benchmarks" skipped due to earlier failure(s)
[2021-07-13T12:42:18.189Z] Stage "Javadoc" skipped due to earlier failure(s)
[2021-07-13T12:42:18.248Z] Failed in branch Unit Tests
[2021-07-13T12:42:18.249Z] Failed in branch Smoke Tests 01
[2021-07-13T12:42:18.250Z] Failed in branch Smoke Tests 02
[2021-07-13T12:42:18.251Z] Failed in branch Benchmarks
[2021-07-13T12:42:18.251Z] Failed in branch Javadoc
[2021-07-13T12:42:18.305Z] Stage "Integration Tests" skipped due to earlier failure(s)
[2021-07-13T12:42:18.346Z] Stage "Stable" skipped due to earlier failure(s)
[2021-07-13T12:42:18.387Z] Stage "AfterRelease" skipped due to earlier failure(s)
[2021-07-13T12:42:18.402Z] Stage "AfterRelease" skipped due to earlier failure(s)
[2021-07-13T12:42:19.687Z] Running on worker-854309 in /var/lib/jenkins/workspace/_java_apm-agent-java-mbp_PR-1914
[2021-07-13T12:42:19.778Z] [INFO] getVaultSecret: Getting secrets
[2021-07-13T12:42:19.820Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2021-07-13T12:42:21.861Z] + chmod 755 generate-build-data.sh
[2021-07-13T12:42:21.861Z] + ./generate-build-data.sh https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-java/apm-agent-java-mbp/PR-1914/ https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-java/apm-agent-java-mbp/PR-1914/runs/5 ABORTED 181445
[2021-07-13T12:42:21.861Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-java/apm-agent-java-mbp/PR-1914/runs/5/steps/?limit=10000 -o steps-info.json
[2021-07-13T12:42:22.563Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-java/apm-agent-java-mbp/PR-1914/runs/5/tests/?status=FAILED -o tests-errors.json
[2021-07-13T12:42:23.264Z] Retry 1/3 exited 22, retrying in 1 seconds...
[2021-07-13T12:42:24.714Z] Retry 2/3 exited 22, retrying in 2 seconds...
[2021-07-13T12:42:26.978Z] Retry 3/3 exited 22, no more retries left.
[2021-07-13T12:42:26.978Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-java/apm-agent-java-mbp/PR-1914/runs/5/log/ -o pipeline-log.txt

@eyalkoren
Copy link
Contributor

This change means that existing service maps will change when you upgrade your agent and you will get multiple behaviors when using mixed agent versions. So such a change should be done very consciously.

While this is definitely an option we are considering, in order to increase granularity of DB service representation, we will not change that in the Java agent before we make the decision and change it in the cross-agents spec.

For context, the reason we don't take this lightly is the risk of getting very high cardinality, which means useless service maps and list of dependencies. The flip side, of too-low cardinality is much a lesser risk, which is why it is the way it is at the moment.

@eyalkoren eyalkoren closed this Jul 13, 2021
@tobiasstadler tobiasstadler deleted the fix-1913 branch July 21, 2021 13:18
@tobiasstadler
Copy link
Contributor Author

@eyalkoren Would you be ok with putting the change behind a configuration option? Of course the current behavior will be the default.

@eyalkoren
Copy link
Contributor

What would be the use case of disabling it? Do you have a specific example of something that will change/break by applying it?

The purpose of auto-inference is that all exit spans fill this field.

@tobiasstadler
Copy link
Contributor Author

I do not want to disable auto-inference. I was talking about the value of context.destination.service.resource for jdbc spans. Currently they are populated with the db vendor. I want(ed) to change that to vendor + instance (as it is done by the auto-inference). You rejected my change (which I totally understand) because it may break existing setups. So I propose to to add a configuration option which changes the value of context.destination.service.resource for jdbc spans to vendor + instance.

@eyalkoren
Copy link
Contributor

eyalkoren commented Jul 21, 2021

Ahh, gotcha, sorry for the misunderstanding.

Do your JDBC spans contain the correct value in the instance field? I think we first need to improve our instance discovery.

This generally sounds like a reasonable request, but, as I said - we are in the process of reevaluating whether to change that by default, so I rather we wait a bit with that. In the mean time, can you apply an ingest pipeline to achieve that?

@tobiasstadler
Copy link
Contributor Author

Yes, in my case (PostgreSQL) span.db.instance contains the value I want.

I tried using an ingest pipeline and it works fine for spans, but it doesn't work for the service_destination metricset, because there is no span.db.instance.

@eyalkoren
Copy link
Contributor

Sorry, I don't follow - the agent sets the span.context.db.instance field, but it is not stored as span.db.instance in Elasticsearch?

@tobiasstadler
Copy link
Contributor Author

tobiasstadler commented Jul 22, 2021

No, it is stored for spans and the ingest pipeline works fine for spans. But the metrics, calculated for the transactions/spans by the apm-server (or kibana?), do not have a span.db.instance field, so I cannot change the resource name for them. So after the ingest pipeline the resource name for the span is postgreSQL/mydb, but the resource name of the metric is still postgres. As these metrics are used to e.g. display the latency, throughput and error rate in the dependencies table, the data is missing their.

Here is an example before the ingest pipeline:

Span

{
    "_index": "apm-7.14.0-span-000001",
    "_type": "_doc",
    "_id": "eLvBzHoBOG9QGDzr1Brm",
    "_score": 1,
    "_source": {
      "parent": {
        "id": "a808c835bd49d7fc"
      },
      "agent": {
        "name": "java",
        "ephemeral_id": "84d5f5fd-f453-4298-b48b-640edf56233d",
        "version": "1.24.1-SNAPSHOT.UNKNOWN"
      },
      "destination": {
        "address": "...",
        "port": ...,
        "ip": "..."
      },
      "processor": {
        "name": "transaction",
        "event": "span"
      },
      "observer": {
        "hostname": "0342e6a2b6bb",
        "id": "80ec3261-4080-4fa8-92e7-f68dbd7d807c",
        "ephemeral_id": "34d2e106-e279-4e18-8195-0d3a4f28032d",
        "type": "apm-server",
        "version": "7.14.0",
        "version_major": 7
      },
      "trace": {
        "id": "34d33e78799821071cf2afec9583955b"
      },
      "@timestamp": "2021-07-22T05:48:07.799Z",
      "ecs": {
        "version": "1.10.0"
      },
      "service": {
        "name": "..."
      },
      "event": {
        "outcome": "success"
      },
      "transaction": {
        "id": "a808c835bd49d7fc"
      },
      "span": {
        "duration": {
          "us": 61833
        },
        "stacktrace": [],
        "subtype": "postgresql",
        "destination": {
          "service": {
            "resource": "postgresql"
          }
        },
        "name": "...",
        "action": "query",
        "id": "43a7cf0244756f9f",
        "type": "db",
        "db": {
          "instance": "mydb",
          "statement": "...",
          "type": "sql",
          "user": {
            "name": "..."
          }
        }
      },
      "timestamp": {
        "us": 1626932887799620
      }
    },
    "fields": {
      "span.stacktrace.line.number": [],
      "span.name": [
        "..."
      ],
      "span.action": [
        "query"
      ],
      "destination.port": [
        ...
      ],
      "span.db.user.name": [
        "..."
      ],
      "transaction.id": [
        "a808c835bd49d7fc"
      ],
      "trace.id": [
        "34d33e78799821071cf2afec9583955b"
      ],
      "span.duration.us": [
        61833
      ],
      "span.stacktrace.classname": [],
      "span.db.statement": [
        "..."
      ],
      "processor.event": [
        "span"
      ],
      "agent.name": [
        "java"
      ],
      "destination.address": [
        "..."
      ],
      "event.outcome": [
        "success"
      ],
      "span.stacktrace.exclude_from_grouping": [],
      "service.name": [
        "..."
      ],
      "span.stacktrace.filename": [],
      "processor.name": [
        "transaction"
      ],
      "span.stacktrace.function": [],
      "span.subtype": [
        "postgresql"
      ],
      "span.id": [
        "43a7cf0244756f9f"
      ],
      "observer.version_major": [
        7
      ],
      "span.stacktrace.library_frame": [],
      "span.stacktrace.module": [],
      "destination.ip": [
        "..."
      ],
      "observer.hostname": [
        "0342e6a2b6bb"
      ],
      "span.type": [
        "db"
      ],
      "timestamp.us": [
        1626932887799620
      ],
      "observer.id": [
        "80ec3261-4080-4fa8-92e7-f68dbd7d807c"
      ],
      "@timestamp": [
        "2021-07-22T05:48:07.799Z"
      ],
      "span.db.type": [
        "sql"
      ],
      "observer.ephemeral_id": [
        "34d2e106-e279-4e18-8195-0d3a4f28032d"
      ],
      "observer.version": [
        "7.14.0"
      ],
      "ecs.version": [
        "1.10.0"
      ],
      "observer.type": [
        "apm-server"
      ],
      "agent.ephemeral_id": [
        "84d5f5fd-f453-4298-b48b-640edf56233d"
      ],
      "parent.id": [
        "a808c835bd49d7fc"
      ],
      "agent.version": [
        "1.24.1-SNAPSHOT.UNKNOWN"
      ],
      "span.destination.service.resource": [
        "postgresql"
      ],
      "span.db.instance": [
        "mydb"
      ]
    }
  }

Metric

{
    "_index": "apm-7.14.0-metric-000001",
    "_type": "_doc",
    "_id": "jrvCzHoBOG9QGDzrhBq9",
    "_score": 1,
    "_source": {
      "agent": {
        "name": "java"
      },
      "processor": {
        "name": "metric",
        "event": "metric"
      },
      "metricset.name": "service_destination",
      "observer": {
        "hostname": "0342e6a2b6bb",
        "id": "80ec3261-4080-4fa8-92e7-f68dbd7d807c",
        "ephemeral_id": "34d2e106-e279-4e18-8195-0d3a4f28032d",
        "type": "apm-server",
        "version": "7.14.0",
        "version_major": 7
      },
      "@timestamp": "2021-07-22T05:48:56.913Z",
      "ecs": {
        "version": "1.10.0"
      },
      "service": {
        "name": "..."
      },
      "metricset": {
        "period": 60000
      },
      "event": {
        "ingested": "2021-07-22T05:48:57.916489641Z",
        "outcome": "success"
      },
      "span": {
        "destination": {
          "service": {
            "resource": "postgresql",
            "response_time": {
              "count": 27,
              "sum": {
                "us": 1564268
              }
            }
          }
        }
      }
    },
    "fields": {
      "service.name": [
        "..."
      ],
      "metricset.period": [
        60000
      ],
      "span.destination.service.response_time.count": [
        27
      ],
      "processor.name": [
        "metric"
      ],
      "observer.version_major": [
        7
      ],
      "observer.hostname": [
        "0342e6a2b6bb"
      ],
      "metricset.name": [
        "service_destination"
      ],
      "event.ingested": [
        "2021-07-22T05:48:57.916Z"
      ],
      "observer.id": [
        "80ec3261-4080-4fa8-92e7-f68dbd7d807c"
      ],
      "span.destination.service.response_time.sum.us": [
        1564268
      ],
      "@timestamp": [
        "2021-07-22T05:48:56.913Z"
      ],
      "observer.ephemeral_id": [
        "34d2e106-e279-4e18-8195-0d3a4f28032d"
      ],
      "observer.version": [
        "7.14.0"
      ],
      "ecs.version": [
        "1.10.0"
      ],
      "observer.type": [
        "apm-server"
      ],
      "processor.event": [
        "metric"
      ],
      "agent.name": [
        "java"
      ],
      "span.destination.service.resource": [
        "postgresql"
      ],
      "event.outcome": [
        "success"
      ]
    }
  }

@eyalkoren
Copy link
Contributor

eyalkoren commented Jul 22, 2021

Yeah, that's right, I was only thinking about getting the nodes in the map, but the DB service metrics won't work.

Since this is not specific to the Java agent, would you mind opening an issue in the https://github.com/elastic/apm repo, describing what you need? I can't find an existing one for this. It would be great to get your input on why you think the instance should be used for DB service node distinction.
Things to keep in mind for making the discussion efficient:

  • How likely is it that by using the instance, we will provide a poor experience OOTB for users that may end up having a very big number of DB nodes?
    • How many instances do you have in your setup?
    • What bounds the number of instances?
    • Are there SQL DBs where the number of instances can typically be very big?
  • What is the best way to get the instance for each DB? In the Java agent, we currently use java.sql.Connection#getCatalog - are there DB vendors for which this will produce very high cardinality?
  • Is the instance notion common to all or most DB vendors?
  • Are there better options than instance, considering all of the above? Could DB name provide better granularity?
  • Whether and how should this be configurable?

I think this is a very important issue and I prefer we tackle it properly, not as a patch.
Let me know if I can assist with that.

Thanks for the useful input!

@tobiasstadler
Copy link
Contributor Author

FYI, I created #1928 to enable resource auto-inference via a config option. I think this is a step in the right direction. It enables me (and possibly others) to include db.instance in destination.service.resource without breaking any existing setup.

In my opinion populating db.instance with the "right" value is a separate problem and I will create an issue for that. Personally I am fine with the current behavior (actually I created the initial PR to use java.sql.Connection#getCatalog), but it probably won't fit every setup (e.g. for Oracle and DB2 getCatalog will return null).

@tobiasstadler
Copy link
Contributor Author

FYI, I created elastic/apm#473

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

resource auto-inference is not working for JDBC spans
3 participants